package com.jml.jdk8.stream;


import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

/**
 * @author:jml
 * @date: 2019/12/4 0004 22:58
 * @description：
 */
public class 创建流的方式 {

    public static void main(String[] args) {
        //第一种
        String [] stream2 = new String[]{"",""};
        Stream<Object> stream = Stream.of("hello","world","hw",stream2);
        Stream<String> stream21 = Stream.of(stream2);
        //第二种
        Stream<String> stream1 = Arrays.stream(stream2);
        //第三种
        List<String> list = Arrays.asList("1","2","3");
        Stream<String> stream3 = list.stream();
        //
    }
}
